package day07;
//输出5位数回文数
public class palindromicNumber {
    public static void main(String[] args) {
        for(int i=10000;i<=99999;i++) {
            Huiwen(i);
        };
    }

    public static int Huiwen(int num) {
        int[] arr = new int[5];
        //12521
        arr[0] = num / 10000 % 10;//万
        arr[1]=num/1000%10;//千
        arr[3]=num/10%10;//十
        arr[4]=num%10;//个

        if(arr[0]==arr[4] && arr[1]==arr[3]){
            System.out.println(num);
            return num;

        }else
            return -1;

    }
}
